package com.zastoupil.pgc.blueprint_pattern.xml;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>
 * A Factory object is used to construct a "master" object based on a
 * {@link Blueprint} object and a set of {@link Modifier} objects. As with the
 * other XMLBean classes in this package, the functionality of concatenating the
 * instruction sets of the Blue print and Modifier objects is reserved for an
 * external factory pattern class.
 * </p>
 * <p>
 * The fields of a Factory object correspond directly to the XML file structure
 * associated with it, and are detailed here:
 * <ul>
 * <li>
 * <b><code>String name</code></b>
 * <p>
 * This is the name of the factory, which can be used in variable calls within
 * expressions used in {@link Property} <code>value</code> strings.
 * </p>
 * </li>
 * <li>
 * <b><code>String blueprint</code></b>
 * <p>
 * This is a String that represents the <code>name</code> of a {@link Blueprint}
 * object.
 * </p>
 * </li>
 * <li>
 * <b><code>List modifierList</code></b>
 * <p>
 * This is a list of strings that each represent the <code>name</code> of a
 * {@link Modifier} object.
 * </p>
 * </li>
 * </ul>
 * </p>
 * 
 * @author Peter Zastoupil
 * 
 */
@XmlRootElement(name = "factory")
@XmlType(propOrder = { "name", "blueprint", "modifierList" })
public class Factory {

	private String name;

	private String blueprint;

	private List<String> modifierList;

	public String getName() {
		return name;
	}

	@XmlElement(name = "name")
	public void setName(String name) {
		this.name = name;
	}

	public String getBlueprint() {
		return blueprint;
	}

	@XmlElement(name = "blueprint")
	public void setBlueprint(String blueprint) {
		this.blueprint = blueprint;
	}

	public List<String> getModifierList() {
		return modifierList;
	}

	@XmlElementWrapper(name = "modifierList")
	@XmlElement(name = "modifier")
	public void setModifierList(List<String> modifierList) {
		this.modifierList = modifierList;
	}

}
